#include "Tcpserver.hpp"
#include <iostream>
#include <memory>

void Usage(char *proc)
{
  std::cout << "\n\rUsage: " << proc << "port[1024+]\n"
            << std::endl;
}

int main(int argc, char *argv[])
{
  if (argc != 2)
  {
    Usage(argv[0]);
    exit(USAGE_ERROR);
  }
  lg.Enable(Classfile);
  uint16_t port = std::stoi(argv[1]);
  std::unique_ptr<Tcpserver> tcpsvr(new Tcpserver(port));

  tcpsvr->InitServer();
  tcpsvr->Start();

  return 0;
}